import { defineComponent } from "vue";
import styles from "./Breadcrumb.module.less";
import { RightOutlined } from "@ant-design/icons-vue";

export default defineComponent({
  props: {
    list: {
      type: Array,
      default: () => [],
    }
  },
  setup(props) {
    return () => (
      <div class={styles.breadcrumb}>
        <a-breadcrumb separator={<RightOutlined />}>
          {
            props.list.map((item: any) => (
              <a-breadcrumb-item>
                <item />
              </a-breadcrumb-item>
            ))
          }
        </a-breadcrumb>
      </div>
    )
  }
})